(function($) {
    var locationStr = getArgs();
    var opts = {
        province: locationStr.province || '',
        city: locationStr.city || '',
        district: locationStr.district || ''
    };

    $.ajax({
        dataType: 'script',
        scriptCharset: 'utf-8',
        url: '//mat1.gtimg.com/pingjs/ext2020/test2017/dist/miniWeather.js',
        success: function() {
            if (typeof jQuery !== 'undefined') { //jQuery已加载
                $("#ct-mini-weather").miniWeather(opts);
            }
            var config = {
                ref: "pdsy" //字段
            };
            $("#ct-mini-weather").bind('click', function() {
                var BossTongji = new Image(1, 1);
                BossTongji.src = "http://btrace.qq.com/kvcollect?BossId=5199&Pwd=451708158&ip=&qq=&pac_uid=&ua=&platform=&fun=&ref=" + config.ref + "&_dc=" + Math.random();
            });

        }
    })

    function getArgs() {
        var args = {};
        var query = location.search.substring(1);
        var pairs = query.split("&");
        for (var i = 0; i < pairs.length; i++) {
            var pos = pairs[i].indexOf("=");
            if (pos == -1) continue;
            var argname = pairs[i].substring(0, pos);
            var value = pairs[i].substring(pos + 1);
            value = decodeURIComponent(value);
            args[argname] = value;
        }
        return args;
    }
})(jQuery)/*  |xGv00|f463093f973d72483cd264349ce0d5ff */